<div class="wrap">
<table width="100%" height="100%" cellpadding="0" cellspacing="0">
	<tr>
	<td width="54px" height="43px" class="fr_lefttop"></td>
	<td height="43px" class="fr_centertop" ></td>
	<td width="48px" height="43px" class="fr_righttop"></td>
	</tr>
	<tr>
	<td width="54px" class="fr_leftmiddle" >&nbsp;</td>
	<td class="fr_centermiddle">
{if $smarty.cookies.message != null}
	<div id="ajaxResponse1" class="ajaxResponse fade" style="display:block">{$smarty.cookies.message}</div>
{/if}
<h2>{t}Add Category{/t}</h2>
<form name="addcat" id="addcat" enctype="multipart/form-data" method="post" action="?mod={$smarty.get.mod}&sub1={$smarty.get.sub1}">
	<input type="hidden" name="act" value="addnewcat" />
	<table class="editform" width="100%" cellspacing="2" cellpadding="5">
    	<tr>
			<th scope="row" valign="middle">
			<label for="cat_parent">{t}Category Type:{/t}</label></th>
			<td>        
	  			<select name='cat_type' id='cat_type' class='postform'>
	  				<option value='0'>{t}None{/t}</option>
		  			{foreach name=cat from=$CATTYPE item=item}
						<option id='type_{$item->cat_type_id}' value='{$item->cat_type_id}'>
						{$item->cat_type_name} 
					</option>
					{/foreach}
				</select>
	  		</td>
		</tr>
        <tr>
			<th width="33%" scope="row" valign="middle">
			<label for="cat_name">{t}Category name:{/t}</label></th>
			<td width="67%">
			<input name="cat_name" id="cat_name" type="text" value="" size="40" /></td>
		</tr>
        <tr>
			<th width="33%" scope="row" valign="top">
			<label for="cat_name">{t}url:{/t}</label></th>
			<td width="67%">
			<input name="url" id="url" type="text" value="" size="40" /></td>

		</tr>
		<tr>
			<th scope="row" valign="middle">
			<label for="cat_parent">{t}Category parent:{/t}</label></th>
			<td>        
	  			<select name='cat_parent' id='cat_parent' class='postform'
	  			onchange="checkPosition('{$smarty.server.SERVER_NAME}',this)">
	  				<option value='0'>{t}None{/t}</option>
		  			{foreach name=cat from=$CATS item=item}
						<option id='cat_parent-{$item->cat_ID}' value='{$item->cat_ID}'>
						{$item->temp_name|replace:"—":"&nbsp;&nbsp;&nbsp;"} ( {$item->cat_type_name} )
					</option>
					{/foreach}
				</select>
	  		</td>
		</tr>
        <tr>
			<th width="33%" valign="middle">
			Logo :</th>
			<td width="67%">
			<input type="file" name="cat_logo" />
            </td>
		</tr>
		<tr>
			<th scope="row" valign="top">
			<label for="cat_description">{t}Description: (optional){/t}</label></th>
			<td><textarea name="cat_description" id="cat_description" rows="5" cols="50" style="width: 97%;"></textarea></td>
		</tr>
        <tr>
			<th width="33%" scope="row" valign="middle">
			<label for="cat_name">{t}Flash :{/t}</label></th>
			<td width="67%">
			<input type="file" name="cat_flash" />
            </td>
		</tr>
        <tr>
			<th width="33%" scope="row" valign="middle">
			<label for="status">Active</label></th>
			<td width="67%">
				<input name="active" id="active" type="checkbox" value="1"/>
			</td>
		</tr>
	</table>
	<p class="submit" align = "right">
		<input type="submit" name="submit" value="{t escape=no}Add Category &raquo;{/t}" />
	</p>
</form>
</td>
	<td width="48px" class="fr_rightmiddle"></td>
	</tr>
	<tr>
	<td width="54px" height="60px" class="fr_leftbot" ></td>
	<td height="60px" class="fr_centerbot"></td>
	<td width="48px" height="60px" class="fr_rightbot" ></td>
	</tr>
</table>
</div>